﻿using System;

namespace LogHelper.SQLiteORM.Attributes
{
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class PrimaryKeyAttribute : ColumnAttribute
    {
        /// <summary>
        ///  主键是否自增长,只针对<see cref="SqliteDataType.Int"/>类型
        /// </summary>                                     
        public bool IsAutoIncrement { get; set; }
        
        public PrimaryKeyAttribute(string type):base(type)
        {
            IsPrimary = true;
            AllowNull = false;
        }
    }
}